package 我的Java学习_算法基础.day_02;

public class _012_翻转字符串 {
    public static void main(String[] args) {
        String a ="avaj学在我";
        System.out.println(reverse(a,a.length()-1));
    }
    static String reverse(String arr, int end){
        if(end==0){
            return ""+arr.charAt(end);
        }
        return arr.charAt(end) + reverse(arr,end-1);
    }
}
